package com.secret.chain.secretchain.mapper;

import com.secret.chain.secretchain.domain.entity.Collect;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CollectMapper {
    @Select("select * from collect where user_id = #{userId}")
    Collect queryByUserId(Integer id);


    @Select("select * from chain_collect where article_id = #{articleId}")
    Collect queryByArticleId(String hash,String address);


    void insert(Collect collect);

    @Delete("delete from chain_collect where id = #{id}")
    void delete(Integer id);
}
